-- GENERATED SPELL FOR [Commander Howser] --


function spell0_27759(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(52460,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27759', 625, 1)
end

function spell1_27759(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_27759', 523, 1)
end

function spell2_27759(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(36132,pUnit)
pUnit:RegisterEvent('Sorts_27759', 6000, 1)
end

function Sorts_27759(pUnit, Event)
local choix_sorts_27759 = math.random(0, 2)
if choix_sorts_27759 == 0 then
pUnit:RegisterEvent('spell0_27759', 1, 1)
end
if choix_sorts_27759 == 1 then
pUnit:RegisterEvent('spell1_27759', 1, 1)
end
if choix_sorts_27759 == 2 then
pUnit:RegisterEvent('spell2_27759', 1, 1)
end
end

function mob27759_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27759', math.random(1500, 3000), 1)
end

function mob27759_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27759_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27759_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27759, 1, 'mob27759_Action')
RegisterUnitEvent(27759, 2, 'mob27759_Leave')
RegisterUnitEvent(27759, 3, 'mob27759_Kill')
RegisterUnitEvent(27759, 4, 'mob27759_Die')
